﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Weazel.Willows.Model
{
	public abstract class BasicType
	{
		private bool resolved;
		public bool Resolved
		{
			get { return resolved; }
			protected set { resolved = value; }
		}

		private TypeRegistry registry;
		public TypeRegistry Registry
		{
			get { return registry; }
			protected set { registry = value; }
		}

		private string name;
		public string Name
		{
			get { return name; }
			protected set { name = value; }
		}

		protected BasicType(TypeRegistry registry, string name)
		{
			this.name = name;
			this.registry = registry;
		}

		public abstract void Resolve();
		public abstract int BitWidth { get; }
		public abstract bool IsSimpleType { get; }

		public override string ToString()
		{
			return name;
		}
	}
}
